/**
 * 链下签名，链上验证
 */

import { ethers } from "ethers"

// 创建消息
const account = "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
const tokenId = "0"
const msgHash = ethers.solidityPackedKeccak256(['address', 'uint256'], [account, tokenId])
console.log(msgHash)
// 签名
const msgHashByte = ethers.getBytes(msgHash)
